/****************************************************************************
*					SimpleFeature
*
*	Description:	General type of feature that return 1 if a set of variables
*					takes a given set of values and 0 otherwise.
*
****************************************************************************/

#ifndef _SimpleFeature_H
#define _SimpleFeature_H

#include <vector>
#include <string>
#include "Feature.h"

class SimpleFeature : public Feature {
  private:
	  
	  // Object ID 
	int id;

	  // Object name
	std::string name;

  protected:

	  // Set of values for which this feature returns 1
	std::vector <unsigned int> varValues;

	  // Number of elements in varValues (for not to call a function size every time)
	unsigned int varValuesSize;

  public:

	  // Standard constructor
	SimpleFeature(void);
      
	  // Standard destructor
	~SimpleFeature();

      // Calculating feature value
    float calculate (const std::vector<unsigned int>& varIDs, const std::vector <unsigned int>& vars) const;
    float calculate (const std::vector <unsigned int>& vars) const;

	  // Removes all elements in internal variables
	void clear (void);

	  // Returns ID of this type of features
	int getObjectID (void) const;

	  // Returns string Name of this type of features
	int getObjectName (std::string &nameStr) const;

      // Sets values for which a feature should return 1
	int setDesiredValues (const std::vector <unsigned int>& desiredValues);

	  // Returns values for which a feature gives 1
	int getDesiredValues (std::vector <unsigned int>& desiredValues) const;

	  // Operator for checking whether two featres are the same
	bool operator==(Feature& second) const;
	
}; // end of class Feature

#endif // _SimpleFeature_H
